﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GoodsDetail.aspx.cs" Inherits="Mobile_New_GoodsDetail" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=2.0,maximum-scale=1,user-scalable=no" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="../New/css/index.css" />
    <link rel="stylesheet" type="text/css" href="../New/swiper/css/swiper-3.3.1.min.css" />
    <script type="text/javascript" src="../New/js/js.js"></script>
    <style type="text/css">
        * {
            margin: 0px;
            padding: 0px;
            list-style: none;
        }

        body {
            background: #f0f0f0;
        }

        a:active {
            outline: hidden;
        }

        .swiper-slide img {
            width: 100%;
        }

        .bottom {
            width: 100%; /*padding-top:50px;*/
            padding-bottom: 40px;
        }

            .bottom .p_1 {
                text-align: center;
                font-size: 18px;
                padding: 15px 5px;
            }

            .bottom .p_2 {
                font-size: 13px;
                color: #575757;
            }

        .chengwen {
            padding: 0px 10px;
            word-break: break-all;
        }

        .bottom img {
            width: 100%;
        }

        .bottom .price {
            color: #f00;
            font-size: 20px;
            text-align: center;
            line-height: 30px;
            font-weight: bold;
            margin-top: 15px;
        }

        .d_1 {
            margin-top: 15px;
            height: 25px;
            text-align: center;
            display: none;
        }

        .li_right {
            display: inline-block;
            margin: 2px;
        }

            .li_right img {
                width: 20px;
                height: 20px;
            }

        .botton {
            color: #fff;
            width: 80px;
            height: 25px;
            line-height: 25px;
            text-align: center;
            background: #fb362e;
            border-radius: 6px;
            margin: 15px auto 0;
            cursor: pointer;
            display: block;
        }
    </style>
    <style type="text/css">
        * {
            margin: 0px;
            padding: 0px;
            list-style: none;
        }

        body {
            background: #f0f0f0;
        }

        a:active {
            outline: hidden;
        }

        .swiper-slide img {
            width: 100%;
        }

        .bottom {
            width: 100%; /*padding-top:50px;*/
            padding-bottom: 40px;
        }

            .bottom .p_1 {
                text-align: center;
                font-size: 18px;
                padding: 15px 5px;
            }

            .bottom .p_2 {
                font-size: 13px;
                color: #575757;
            }

        .chengwen {
            padding: 0px 10px;
            word-break: break-all;
        }

        .bottom img {
            width: 100%;
        }

        .bottom .price {
            color: #f00;
            font-size: 20px;
            text-align: center;
            line-height: 30px;
            font-weight: bold;
            margin-top: 15px;
        }

        .d_1 {
            margin-top: 15px;
            height: 25px;
            text-align: center;
            display: none;
        }

        .li_right {
            display: inline-block;
            margin: 2px;
        }

            .li_right img {
                width: 20px;
                height: 20px;
            }

        .botton {
            color: #fff;
            width: 80px;
            height: 25px;
            line-height: 25px;
            text-align: center;
            background: #fb362e;
            border-radius: 6px;
            margin: 15px auto 0;
            cursor: pointer;
            display: block;
        }


        .footer {
            position: fixed;
            bottom: 0px;
            left: 0px;
            width: 100%;
            height: 50px;
        }

        .footer_left {
            width: 20%;
            height: 100%;
            background: #000;
            color: #fff;
            text-align: center;
            font-size: 12px;
            float: left;
            position: relative;
        }

        .footer_right {
            float: right;
            width: 80%;
            background: #FC263E;
            height: 100%;
            line-height: 50px;
            color: #fff;
            text-align: center;
            font-size: 16px;
        }

        .footer_left img {
            width: 20px;
            margin-top: 8px;
            margin-bottom: 3px;
        }

        .footer_left span {
            display: block;
            width: 15px;
            height: 15px;
            text-align: center;
            line-height: 15px;
            background: #FC263E;
            color: #fff;
            font-size: 12px;
            position: absolute;
            left: 50%;
            top: 5px;
            margin-left: 8px;
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div class="bottom">
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    <asp:Repeater runat="server" ID="goodspic">
                        <ItemTemplate>
                            <div class="swiper-slide" onclick="openWin('guanggao');">
                                <img src="<%# SubStr(Eval("GoodsSlideshow_img").ToString()) %>" title="" onerror="this.src='../New/images/index_nopic.png'" />
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
                <div class="swiper-pagination"></div>
            </div>
            <asp:Repeater runat="server" ID="rptGoodsDetail">
                <ItemTemplate>
                    <p class="p_1">
                        <%# Eval("Name")%>
                    </p>
                    <div class="chengwen">
                        <p class="p_2" style="text-align: center">
                            <%# System.Web.HttpUtility.UrlDecode(Chain.Common.StringPlus.HtmlDecode(Eval("GoodsRemark").ToString()))%>
                        </p>
                    </div>
                    <div class="price">￥ <%# decimal.Parse(Eval("Price").ToString()).ToString("0.00")%>/ <%# Eval("Unit")%></div>
                    <div class="botton" style="width: 80px; display: none;" onclick="goumai(this);">加入购物车</div>
                   
                    <input type="hidden" id="number_<%# Eval("GoodsID")%>" value="0" />
                </ItemTemplate>
            </asp:Repeater>

            <input id="hid_id" runat="server" type="hidden" value="0" />
            <input id="hid_price" runat="server" type="hidden" value="0" />
            <div>
                <p class="p_1">-规格-</p>
                <p class="p_2" style="padding: 0 10px;" id="standards" runat="server">规格：无</p>
            </div>
            <div style="height: 40px; width: 100%"></div>
        </div>

        <div class="footer">
            <div class="footer_left" onclick="goshop();">
                <img src="../New/images/shopcart.png" />
                <span id="icon_num">0</span>
                <p id="icon_price">¥0.0</p>
            </div>
            <div class="footer_right" onclick="AddToCart();">加入购物车</div>
        </div>
    </form>
</body>

<script type="text/javascript" src="../New/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../New/swiper/js/swiper-3.3.1.min.js"></script>
<script type="text/javascript" src="../New/js/GoodsList.js"></script>
<script type="text/javascript" src="../New/js/xxl.base.js"></script>
<script type="text/javascript">

    $(function () {
        var mySwiper = new Swiper('.swiper-container', {
            pagination: '.swiper-pagination',
            paginationClickable: true,
            loop: true,
            autoplayDisableOnInteraction: false,
            autoplay: 2000
        });

        $("#icon_num").text(getCookie("goodlist_num"));
        $("#icon_price").text("¥" + getCookie("goodlist_price"));
        if (getCookie("goodlist_num") > 0) {
            $("#icon_num").css("display", "block");
            $("#icon_price").css("display", "block");
        }

    });

    function AddToCart() {
        var id = $("#hid_id").val().trim();
        var price = $("#hid_price").val().trim();
        index_changenums(id, price, "+");
    }

    function goshop() {

        window.location.href = 'shopcart.aspx';
    }
</script>
</html>
